# Contributor: Matthias Ahouansou <matthias@ahouansou.cz>
# Maintainer: Matthias Ahouansou <matthias@ahouansou.cz>
pkgname=tree-sitter-caddy
pkgver=0_git20230322
_gitrev=65b60437983933d00809c8927e7d8a29ca26dfa3
pkgrel=0
pkgdesc="Caddyfile grammar for tree-sitter"
url="https://github.com/Samonitari/tree-sitter-caddy"
arch="all"
license="MIT"
makedepends="tree-sitter-dev"
checkdepends="tree-sitter-cli"
install_if="tree-sitter-grammars"
subpackages="$pkgname-doc"
source="$pkgname-$_gitrev.tar.gz::https://github.com/Samonitari/tree-sitter-caddy/archive/$_gitrev.tar.gz"
builddir="$srcdir/$pkgname-$_gitrev"

build() {
	abuild-tree-sitter build
}

check() {
	tree-sitter test
}

package() {
	DESTDIR="$pkgdir" abuild-tree-sitter install

	install -Dm 644 LICENSE "$pkgdir"/usr/share/licenses/"$pkgname"/LICENSE
}

sha512sums="
6bda2b1b7a7c4c4387021d26580eb99a91bc7756b737c7f7205428ea178744c4efafc38be3c8ad41065816113d127a2307c42bdaa05d9543d0b33fb8851865ee  tree-sitter-caddy-65b60437983933d00809c8927e7d8a29ca26dfa3.tar.gz
"
